A control function of a control. device is stored as control program code in a memory of the control device, and is processed in order to execute the control functions. To test the functionality of the control device, it is advantageous to simulate the control program code beforehand, i.e. to represent the control functions as a model and execute a correspondingly generated simulation program code in real time. In this context, the simulation program code is generated by a simulation tool.
One or more control device functions are modeled in an "external bypass" and simulated on a processor provided in an external simulation computer. Other control functions which are not to be simulated, as well as the operating system drivers and hardware drivers, run on the internal processor provided in the control device. With the external bypass, processing of the simulation program code is accomplished in the external simulation computer, communication with the control device taking place via interfaces, for example by means of a CAN bus.
FIG. 1 shows a general configuration of an external bypass for the control program code, in which simulation of the control functions of a control device 20 to be simulated takes place in an external simulation computer 30.
Control device 20 has a plurality of control functions which are used to control an arbitrary assembly 10, for example a motor vehicle engine. For the development of new control functions or the enhancement of existing control functions of control device 20, corresponding control program code modules of the control program code stored in the control device memory are replaced by a calculation in an external processor which is located in an external simulation computer 30. The simulation program code generated by the simulation tool is processed in the external processor of simulation computer 30. While assembly 10 is operating, for example while the engine is operating, the simulation program code receives the corresponding input variables or input data, via interfaces, from the control program code of control device 20; it then executes or processes them, and writes the output data or result variables back into control device 20. It is thereby possible during operation to modify, for example, the engine control functions of a vehicle, and observe the results directly on the vehicle. The control functions of control device 20 to be tested are modeled by an input device 40, and entered into the external simulation computer.
The input data for the control functions displaced into the external simulation computer 30 are made available by control device 20, and the output data of the control functions displaced into the external simulation computer 30 are delivered back to control device 20.
The external bypass, described above, of portions of the control program code stored in control device 20 has several disadvantages. An external simulation computer is necessary for simulating the control device functions. In addition, the interfaces must be so fast that the input variables arriving from the external assembly are available quickly enough to the simulation computer, and the calculated data are available in timely fashion to control device 20 for further processing in the control device program.
This means an additional hardware outlay for the additional interfaces and the external simulation computer itself. Data are continually being exchanged via the interfaces between control device 20 and the external simulation computer 30, additional time being required for the data transmission. This time loss can considerably impair a simulation of the control device functions that must occur in real time. The simulation computer 30 to be provided in the case of the external bypass is, moreover, not designed for certain environmental conditions, as control device 20 is. It is thus not possible to take into account appropriately the influence of environmental conditions on the simulation.